package jh.com.jhappbf.utils;

import java.util.regex.Pattern;

/**
 * @author Administrator
 */
public class ExpressionUtils {

    /**
     * 判断该字符串是否为整数或浮点数
     *
     * @param input 字符串
     * @return 是返回true 否则返回false
     */
    public static synchronized boolean isNumber(String input) {
        if (input == null || "".equals(input)) {
            return false;
        }

        return Pattern.matches("-?[0-9]*(\\.?)[0-9]*", input);
    }
}
